﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DictSelector.aspx.cs" Inherits="Sdepci.InfoCode.Web.CodeIndex.DictSelector" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>编码字典选择</title>
    <link rel="stylesheet" type="text/css" href="../Css/Style.css" />
    <link rel="stylesheet" type="text/css" href="../Css/Backstage.css" />
    <script type="text/javascript" src="../Javascript/Tree.js"></script>
    <script language="javascript" type="text/javascript">
        var level;
        var multiselect;
        function ShowTree() {
            imagesDir = "../Images/Tree/";
            affect = "dictselect";
            icon = false;
            level = document.getElementById("level").value;
            multiselect = document.getElementById("multiselect").value;
            if (multiselect != undefined && multiselect == "true") {
                selected = "";
                checktype = "radio";
            }
            InitTreeXml();
            NodeAllExpand(rootNode);
        }
        
        function GetValue(desc) {
            var rtn = desc.split('-')[0];
            if (document.getElementById("length").value != "") {
                if (document.getElementById("position").value == "backward") {
                    for (i = 0; i < document.getElementById("length").value - desc.split('-')[0].length; i++) {
                        rtn += document.getElementById("supplement").value;
                    }
                }
                else if (document.getElementById("position").value == "forward") {
                    for (i = 0; i < document.getElementById("length").value - desc.split('-')[0].length; i++) {
                        rtn = document.getElementById("supplement").value + rtn;
                    }
                }
            }

            parent.SetObjValue(rtn);
        }

        function GetValue_Multi(desc) {
            var rtn = desc.split('-')[0];
        }
    </script>
</head>
<body onload="javascript:ShowTree();" style="background-color: #ffffec;">
    <form id="form1" runat="server">
    <asp:HiddenField ID="length" runat="server" />
    <asp:HiddenField ID="supplement" runat="server" />
    <asp:HiddenField ID="position" runat="server" />
    <asp:HiddenField ID="level" runat="server" />
    <asp:HiddenField ID="multiselect" runat="server" />
    <asp:HiddenField ID="separator" runat="server" />
    <div id="container">
        <div id="dicttree" style="text-align: left; border: solid 1px #92b7e1; width: 100%; height: 285px; background-color: #ffffff; overflow: auto;">
            <div id="root_child">载入中...</div>
        </div>
        <div style="padding: 2px 0px 0px 0px; color: #808080;">
            <asp:Label ID="lblCateName" runat="server" Text="Label"></asp:Label>
        </div>
    </div>
    </form>
</body>
</html>
